package createEateryDB;

import java.sql.*;   // Needed for JDBC classes

/**
 * This program creates the EateryDB database.
 */
public class CreateEateryDB
{
   public static void main(String[] args)
   {
      // Create a named constant for the URL.
      // NOTE: This value is specific for Java DB.
      String driver = "org.apache.derby.jdbc.ClientDriver";    
      final String DB_URL = "jdbc:derby://localhost:1527/EateryDB;create=true";
      
      try 
      {
      Class.forName(driver); 
      } 
      catch(java.lang.ClassNotFoundException e) 
      {
      }
      
      try
      {
         // Create a connection to the database.
         Connection conn = DriverManager.getConnection(DB_URL);
					 
	// If the DB already exists, drop the tables.
	dropTables(conn);
	
        // Build the Employee table.
        buildEmployeeTable(conn);
        
	// Build the Payroll table.
	buildPayrollTable(conn);
        
        // Build the Clock in/out table.
        buildClockInOutTable(conn);
			
        // Build the Sales table.
        buildSalesTable(conn);
			
	// Build the Menu table.
	buildInventoryTable(conn);

         // Close the connection.
         conn.close();
      }
      catch (Exception ex)
      {
         System.out.println("ERROR: " + ex.getMessage());
      }
   }
	
	/**
	 * The dropTables method drops any existing
	 * in case the database already exists.
	 */
	public static void dropTables(Connection conn)
	{
            System.out.println("Checking for existing tables.");
            try
            {
                // Get a Statement object.
		Statement stmt  = conn.createStatement();;
                
                try
                {
                    // Drop the Employee table.
                    stmt.execute("DROP TABLE Employee");
                    System.out.println("Employee table dropped.");
		}
		catch(SQLException ex)
		{
                    // No need to report an error.
		    // The table simply did not exist.
		}
                
                 try
                {
                    // Drop the Payroll table.
                    stmt.execute("DROP TABLE Payroll");
                    System.out.println("Payroll table dropped.");
		}
		catch(SQLException ex)
		{
                    // No need to report an error.
		    // The table simply did not exist.
		}
                
                 try
		{
                    // Drop the Inventory table.
                    stmt.execute("DROP TABLE ClockInOut");
                    System.out.println("ClockInOut table dropped.");
		}
		catch(SQLException ex)
                {
                    // No need to report an error.
		    // The table simply did not exist.
		}
                 
                try
                {
                    // Drop the Sales table.
                    stmt.execute("DROP TABLE Sales");
		    System.out.println("Sales table dropped.");				
		}
		catch(SQLException ex)
                {
                    // No need to report an error.
		    // The table simply did not exist.
		}
                
                try
		{
                    // Drop the Inventory table.
                    stmt.execute("DROP TABLE Inventory");
                    System.out.println("Inventory table dropped.");
		}
		catch(SQLException ex)
                {
                    // No need to report an error.
		    // The table simply did not exist.
		}
	}
  	catch(SQLException ex)
	{
            System.out.println("ERROR: " + ex.getMessage());
            ex.printStackTrace();
	}
}
	/**
	 * The buildEmployeeTable method creates the
	 * Employee table and adds some rows to it.
	 */
	public static void buildEmployeeTable(Connection conn)
	{
            try
            {
            // Get a Statement object.
            Statement stmt = conn.createStatement();
        
            // Create the table.
            stmt.execute("CREATE TABLE Employee (" +
                         "EmployeeID INT NOT NULL CONSTRAINT EMPLOYEEID_PK PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 100, INCREMENT BY 1), " +
                         "LastName CHAR(15), " +
                         "FirstName CHAR(15), " +
                         "SSN CHAR(9), " +
                         "DOB DATE, " +
                         "Address CHAR(30), " +
                         "City CHAR (20), " +
                         "State CHAR(2), " + 
                         "Zip CHAR(5), " +
                         "Telephone CHAR(15), " +
                         "HireDate DATE, " +
                         "HourlyWage DOUBLE, " +
                         "FilingStatus CHAR(1), " +
                         "Dependents INT," +
                         "JobCode CHAR(1) CONSTRAINT JobCode_CK \n " +
                            "CHECK (JobCode IN ('M', 'C', 'K', 'G')), " + 
                         "CONSTRAINT EMPLOYEEID_CK CHECK (EmployeeID >= 100 AND EmployeeID <= 999) )");      
         
              // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'Blackbeard', " +
                         "'Tim', " +
                         "'670345671', " +
                         "'10/10/1970', " +
                         "'768 morningside dr.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9102229087', " +
                         "'03/30/2003', " +
                         "20.00, " +
                         "'M', " +
                         "1, " +
                         "'G' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " +
                         "VALUES ( " +
                         "'Harris', " +
                         "'Bryan', " +
                         "'652048954', " +
                         "'02/18/1980', " +
                         "'145 Murchison rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9109993738', " +
                         "'01/30/2014', " +
                         "10.00, " +
                         "'D', " +
                         "2, " +
                         "'M' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee(LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate,HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " +  
                         "VALUES ( " +
                         "'Hitchcock', " +
                         "'April', " +
                         "'928640653', " +
                         "'09/04/1989', " +
                         "'700 Stacey weaver rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'3218905567', " +
                         "'02/15/2012', " +
                         "9.00, " + 
                         "'S', " +
                         "1, " +
                         "'M' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'Hansel', " +
                         "'Jeffrey', " +
                         "'587584785', " +
                         "'07/15/1990', " +
                         "'227 Prince Charles dr.', " +
                         "'Fayetteville', " +
                         "'NC', " + 
                         "'28311', " +
                         "'9107869999', " +
                         "'02/20/2010', " +
                         "8.00, " +
                         "'S', " +
                         "1, " +
                         "'C' )" );
            
            // Insert employee
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " +  
                         "VALUES ( " +
                         "'Freeman', " +
                         "'Jessica', " +
                         "'908447896', " +
                         "'08/11/1992', " +
                         "'897 Fort Bragg rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28303', " +
                         "'9109985643', " +
                         "'05/30/2011', " +
                         "7.75, " +
                         "'M', " +
                         "2, " +
                         "'C' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'McMiller', " +
                         "'Lauren', " +
                         "'908226754', " +
                         "'07/14/1989', " +
                         "'876 Lollipop Ln.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9108886784', " +
                         "'07/03/2010', " +
                         "7.75, " +
                         "'D', " +
                         "1," +
                         "'K' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'McBryan', " +
                         "'Josh', " +
                         "'900876519', " +
                         "'03/13/1990', " +
                         "'949 Yellow Brick Rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28303', " +
                         "'9107774659', " +
                         "'10/03/2007', " +
                         "11.00, " +
                         "'S', " +
                         "0, " +
                         "'K' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'Henderson', " +
                         "'Steven', " +
                         "'999875678', " +
                         "'03/16/1991', " +
                         "'908 Rainbow Rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9106669532', " +
                         "'11/08/2012', " +
                         "7.75, " +
                         "'D', " +
                         "0, " +
                         "'K' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'Crawford', " +
                         "'Larry', " +
                         "'555892341', " +
                         "'06/14/1989', " +
                         "'998 London Bridge Rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9108903345', " +
                         "'12/25/2013', " +
                         "7.25, " +
                         "'M', " +
                         "1, " +
                         "'K' )" );
            
            // Insert employee.
            stmt.execute("INSERT INTO Employee (LastName, " +
                         "FirstName, SSN, DOB, Address, " +
                         "City, State, Zip, Telephone, " +
                         "HireDate, HourlyWage, FilingStatus," +
                         "Dependents, JobCode) " + 
                         "VALUES ( " +
                         "'McGuirrer', " +
                         "'Sarah', " +
                         "'333591245', " +
                         "'09/11/1990', " +
                         "'785 Story Brook Rd.', " +
                         "'Fayetteville', " + 
                         "'NC', " +
                         "'28311', " +
                         "'9107894453', " +
                         "'04/20/2010', " +
                         "7.75, " +
                         "'D', " +
                         "0 ," +
                         "'K' )" );
							 
            System.out.println("Employee table created.");
            }
            catch (SQLException ex)
            {
                System.out.println("ERROR: " + ex.getMessage());
            }
        }
        
	/**
	 * The buildPayrollTable method creates the
	 * Payroll table and adds some rows to it.
	 */
	public static void buildPayrollTable(Connection conn)
	{
            try
            {
            // Get a Statement object.
            Statement stmt = conn.createStatement();
        
            // Create the payroll table.
            stmt.execute("CREATE TABLE Payroll (" +
                         "EmployeeID INT NOT NULL REFERENCES Employee(EmployeeID), " +
                         "HoursWorked DOUBLE, " +
                         "PayRate DOUBLE, " +
                         "HourlyTotal DOUBLE, " +
                         "OvertimeHoursWorked DOUBLE DEFAULT 0, " +
                         "OvertimePayRate DOUBLE DEFAULT 0, " +
                         "OvertimeTotal DOUBLE DEFAULT 0, " +
                         "GrossIncome DOUBLE, " + 
                         "SocialSecurityTax DOUBLE DEFAULT 0, " +
                         "Medicare DOUBLE DEFAULT 0, " + 
                         "Federal DOUBLE DEFAULT 0, " +
                         "State DOUBLE DEFAULT 0, " +
                         "NetIncome DOUBLE DEFAULT 0, " + 
                         "PayDate CHAR(10) DEFAULT NULL)" );
							 
            System.out.println("Payroll table created.");
            }
            catch (SQLException ex)
            {
                System.out.println("ERROR: " + ex.getMessage());
            }
        }
        
        /**
	 * The buildClockInOutTable method creates the
	 * Clock in/out table and adds some rows to it.
	 */
	public static void buildClockInOutTable(Connection conn)
	{
            try
            {
            // Get a Statement object.
            Statement stmt = conn.createStatement();
            
            // Create the table.
            stmt.execute("CREATE TABLE ClockInOut (" +
                         "EmployeeID INT NOT NULL REFERENCES Employee(EmployeeID), " +
                         "ClockIn TIMESTAMP DEFAULT NULL, " +
                         "ClockOut TIMESTAMP DEFAULT NULL, " +
                         "TotalTime CHAR(8) DEFAULT NULL) ");
            
            System.out.println("ClockInOut table created.");
            }
            catch (SQLException ex)
            {
                System.out.println("ERROR: " + ex.getMessage());
            }
        }

	/**
	 * The buildSalesTable method creates the
	 * Sales table and adds some rows to it.
	 */
	public static void buildSalesTable(Connection conn)
        {
            try
            {
                // Get a Statement object.
                Statement stmt = conn.createStatement();
         
                // Create the table.
                stmt.execute("CREATE TABLE Sales (" +
                             "CheckID INT NOT NULL CONSTRAINT CHECKID_PK PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), " + 
                             "PayDate DATE DEFAULT NULL, " +
                             "SalesPrice DOUBLE, " +
                             "Tax DOUBLE, "    +
                             "Total DOUBLE GENERATED ALWAYS AS (SalesPrice + Tax))");

                // Add some rows to the new table.
                stmt.executeUpdate("INSERT INTO Sales (PayDate," +
                                    "SalesPrice, Tax) VALUES ( " +
                                    "'04/29/2014', 8.00, 3.00)");
                
                // Add some rows to the new table.
                stmt.executeUpdate("INSERT INTO Sales (PayDate," +
                                    "SalesPrice, Tax) VALUES ( " +
                                    "'04/29/2014', 80.00, 9.00)");
					
		System.out.println("Sales table created.");
           }
	   catch (SQLException ex)
           {
               System.out.println("ERROR: " + ex.getMessage());
           }
	}

	/**
	 * The buildInventoryTable method creates
	 * the Menu table.
	 */

		/**
	 * The buildInventoryTable method creates
	 * the Menu table.
	 */

	public static void buildInventoryTable(Connection conn)
	{
            try
            {
                // Get a Statement object.
                Statement stmt = conn.createStatement();
			
                // Create the table.
                stmt.execute("CREATE TABLE Inventory (" +
                             "ProductID CHAR(10) NOT NULL CONSTRAINT MENUID_PK PRIMARY KEY, " +
                             "ProductName CHAR(20), " +
                             "ProductDescription CHAR(30)," +
                             "ProductQuantityOnHand DOUBLE, " + // what we have
                             "ProductNeeded DOUBLE, " + // how many we need
                             "ProductPrice DOUBLE)"); // per case
                
                // Add some rows to the new table.
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000000'," + 
                                   "'Coke'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000001'," + 
                                   "'Diet Coke'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000002'," + 
                                   "'Sprite'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000003'," + 
                                   "'Mello Yello'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000004'," + 
                                   "'Dr. Pepper'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000005'," + 
                                   "'Barq Root Beer'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000006'," + 
                                   "'Lemonade'," +
                                   "'Beverage', " +
                                   "3, " +
                                   "3, " +
                                   "6.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000007'," + 
                                   "'Bottled Water'," +
                                   "'Beverage', " +
                                   "20, " +
                                   "20, " +
                                   "2.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000008'," + 
                                   "'Hot Dog'," +
                                   "'Entree', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000009'," + 
                                   "'Hamburger'," +
                                   "'Entree', " +
                                   "50, " +
                                   "50, " +
                                   "40.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000010'," + 
                                   "'Chicken'," +
                                   "'Entree', " +
                                   "100, " +
                                   "100, " +
                                   "50.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000011'," + 
                                   "'Chicken Strips'," +
                                   "'Entree', " +
                                   "100, " +
                                   "100, " +
                                   "50.00)");
                
                // Desserts
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000012'," + 
                                   "'Vanilla Ice Cream'," +
                                   "'Desserts', " +
                                   "5, " +
                                   "5, " +
                                   "5.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000013'," + 
                                   "'Chocolate Ice Cream'," +
                                   "'Desserts', " +
                                   "5, " +
                                   "5, " +
                                   "7.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000014'," + 
                                   "'Strawberry Ice Cream'," +
                                   "'Desserts', " +
                                   "5, " +
                                   "5, " +
                                   "7.00)");
                
                // Add-on items.                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000015', " + 
                                   "'Avocado', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "60.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000016', " + 
                                   "'Bacon', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "40.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000017', " + 
                                   "'Cheese Slice', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "30.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000018', " + 
                                   "'Chili', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "50.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000019', " + 
                                   "'Coleslaw', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "50.00)");
                                           
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000020', " + 
                                   "'Lettuce', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "10.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000021', " + 
                                   "'Mayo', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "10.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000022', " + 
                                   "'Mixed Cheese', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000023', " + 
                                   "'Mushrooms', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "40.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000024', " + 
                                   "'Onions', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "25.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000025', " + 
                                   "'Pickle', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000026', " + 
                                   "'Sauerkraut', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "30.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000027', " + 
                                   "'Tomatoes', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000028', " + 
                                   "'Bananas'," +
                                   "'Desserts', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000029', " + 
                                   "'Ice Cream Cones', " +
                                   "'Desserts', " +
                                   "50, " +
                                   "50, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000030', " + 
                                   "'Chocolate Topping', " +
                                   "'Add-Ons', " +
                                   "50, " +
                                   "50, " +
                                   "30.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000031', " + 
                                   "'16 oz. Cups', " +
                                   "'Materials', " +
                                   "20, " +
                                   "20, " +
                                   "15.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000032', " + 
                                   "'20 oz. Cups', " +
                                   "'Materials', " +
                                   "20, " +
                                   "20, " +
                                   "20.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000033', " + 
                                   "'22 oz. Cups', " +
                                   "'Materials', " +
                                   "20, " + 
                                   "20, " +
                                   "25.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000034', " + 
                                   "'Straws', " +
                                   "'Materials', " +
                                   "20, " + 
                                   "20, " +
                                   "10.00)");
                
                stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000035', " + 
                                   "'Paper Bags' ," +
                                   "'Materials', " +
                                   "50, " + 
                                   "50, " +
                                   "25.00)");
                
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000036', " + 
                                   "'Togo Boxes' ," +
                                   "'Materials', " +
                                   "50, " + 
                                   "50, " +
                                   "25.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000037'," + 
                                   "'Hot Dog Bun'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000038'," + 
                                   "'Hamburger Bun'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
				
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000039'," + 
                                   "'Fries'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000040'," + 
                                   "'Hushpuppies'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000041'," + 
                                   "'Mac-n-Cheese'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000042'," + 
                                   "'Beans'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
               stmt.execute("INSERT INTO Inventory (ProductID, ProductName, " +
                             "ProductDescription, " +
                             "ProductQuantityOnHand, ProductNeeded," +
                             "ProductPrice) VALUES(" +
                                   "'0000000043'," + 
                                   "'Baked Potato'," +
                                   "'Materials', " +
                                   "50, " +
                                   "50, " +
                                   "15.00)");
               
		System.out.println("Inventory table created.");
            }
            catch (SQLException ex)
            {
                System.out.println("ERROR: " + ex.getMessage());
            }
	}
}